import request from '@/utils/request'
/**
 * 获取商品详情
 * @param {String} id - 商品ID
 */
export const findGoods = (id) => {
        return request('/goods', 'get', { id })
    }
    /**
     * 获取商品同类推荐-未传入ID为猜喜欢
     * @param {String} id - 商品ID
     * @param {Number} limit - 获取条数
     */
export const findRelevantGoods = ({ id, limit = 16 }) => {
    return request('/goods/relevant', 'get', { id, limit })
}
export const findHotGoods = ({ id, type, limit = 3 }) => {
    return request('/goods/hot', 'get', { id, type, limit })
}
export const findCommentInfoByGoods = (id) => {
    // return request(`/goods/${id}/evaluate`)
    return request(`https://mock.boxuegu.com/mock/1175/goods/${id}/evaluate
    `, 'get')
}
export const findCommentGoodsList = (id, params) => {
    // return request(`/goods/${id}/evaluate`)
    return request(`https://mock.boxuegu.com/mock/1175/goods/${id}/evaluate/page`, 'get', params)
}